wayland: emit GDK_SELECTION_CLEAR on owner changes
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 28 Nov 2017 16:44:06 +0000 (17:44 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Wed, 29 Nov 2017 10:29:30 +0000 (11:29 +0100)
commitff3da0818c4cad3232137faf082b38519f7ef4ad
tree59f442c7898bc2d22ea31c04f6ff4462882659c6
parent93f6f253ea123860561451c9a0edbd5e0b7504b7
wayland: emit GDK_SELECTION_CLEAR on owner changes

The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790031
gdk/wayland/gdkselection-wayland.c